//
//  Executor.h
//  Executor
//
//  Created by Chris Wong on 4/30/12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//
#include <vector>
#include <string>

#define numThread 1000

struct threadInfo{
    bool isDone;
    int commandCounter;
    bool  background;
    char *** args;
    int exitStatus;
    char ** envVars;
    std::string output;
    std::string error;
    char * fileIN;
    char * fileOUT;
    char * fileERROR;
    int procID;
};

class Executor{

public:
    int temp;
    std::vector<int> psTrac;
    Executor();
    void runThread(char ** args[] ,bool background, char ** envVars,threadInfo *thread);
    void killChild(int processID);
private:
    pthread_t thread[numThread];
};
